package com.ddwl.order.service.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.time.Instant;
import java.util.List;

/**
 * 类OrderSkuListDto.java的实现描述：创建订单商品信息
 *
 * @author zach
 * @Date :2020-12-01 17:03.
 */
@Getter
@Setter
public class OrderSkuListDto {

    @ApiModelProperty("skuId")
    private String skuId;

    @ApiModelProperty("数量")
    private Integer skuQty;

    @ApiModelProperty("SKU图片")
    private String skuPic;

    @ApiModelProperty("sku编码")
    private String skuCode;

    @ApiModelProperty("商品id")
    private String itemId;

    @ApiModelProperty("商品id")
    private String spuId;

    @ApiModelProperty("商品编码")
    private String spuCode;

    @ApiModelProperty("商品名称")
    private String itemName;

    @ApiModelProperty("商品类目Id")
    private String categoryId;

    @ApiModelProperty("商品状态 0下架 1上架")
    private Integer itemStatus;

    @ApiModelProperty("原单价")
    private BigDecimal price;

    @ApiModelProperty("分润金额")
    private BigDecimal profitPrice;

    @ApiModelProperty("成交单价 成交单价 = price - deratePrice-subsidyPrice")
    private BigDecimal realPrice;

    @ApiModelProperty("sku描述")
    private String skuDesc;

    @ApiModelProperty("阶段信息")
    List<PhasePrice> phasePrices;

    @ApiModelProperty("成本价")
    private BigDecimal factoryPrice;

    @ApiModelProperty("优惠抵扣价格")
    public BigDecimal deratePrice;

    @ApiModelProperty("津贴抵扣价格")
    public BigDecimal subsidyPrice;

    @ApiModelProperty("津贴抵扣价格余数")
    public BigDecimal otherSubsidyPrice;

    @ApiModelProperty("供应商ID")
    public String supplierId;

    @ApiModelProperty("店铺Id")
    public String shopId;

    @ApiModelProperty("店铺名称")
    public String shopName;

    @ApiModelProperty("0快递1外送2自提默认快递")
    private Integer deliveryType;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "参与的活动id")
    private String activityId;

    @ApiModelProperty(value = "用户收货地址")
    private String userAdderId;
    /**
     * 收件人手机号
     */
    private String mobile;

    @ApiModelProperty("是否打折，0否 1是")
    private Integer discountFlag;

    @ApiModelProperty("是否限时购，0否 1是")
    private Integer limitTimeFlag;

    @ApiModelProperty(value = "是否公益商品 0否 1是")
    private Integer charityFlag;

    @ApiModelProperty(value = "是否代理商品 0否 1是")
    private Integer agentFlag;

    @ApiModelProperty(value = "代理销售门店ID")
    private String agentShopId;

    @Data
    @ApiModel("阶段支付信息")
    public class PhasePrice{
        @ApiModelProperty("开始时间")
        private Instant startTime;
        @ApiModelProperty("结束时间")
        private Instant endTime;
        @ApiModelProperty("价格")
        private BigDecimal amount;
        @ApiModelProperty("阶段")
        private Integer phase;
    }
}
